package com.tuniu.agents.message;

import java.util.List;
import java.util.Map;

/**
 * Implementation of AgentLogger
 */
public interface AgentLogger {

    /**
     * Objects used in the call method of the Agent
     *
     * @param conversationId The ID of the conversation
     * @param messages       User messages
     * @return List of strings
     */
    List<String> before(String conversationId, Object messages);

    default List<String> before(String conversationId, Object messages, Map<String,Object> context) {
        return this.before(conversationId, messages);
    }

    /**
     * Objects used in the call method of the Agent
     *
     * @param conversationId The ID of the conversation
     * @param messages       User messages
     * @param result         The result
     * @return The result
     */
    List<String> after(String conversationId, Object messages, Object result);
    default List<String> after(String conversationId, Object messages, Map<String,Object> context, Object result) {
        return this.after(conversationId, messages,result);
    }

    /**
     * Exception return when calling the Agent's call method
     *
     * @param conversationId The ID of the conversation
     * @param messages       User messages
     * @param throwable      The exception
     * @return Result
     */
    default List<String> throwable(String conversationId, Object messages, Throwable throwable) {
        return List.of();
    }

}
